bimodal: pvfb frontend
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 23 Jan 2007 14:47:26 +0000 (14:47 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 23 Jan 2007 14:47:26 +0000 (14:47 +0000)
Create a new node "protocol" in xenstore, add the protocol name it
speaks there.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c

index 40846d1d09e7644e5fc7fd19cf1011e069fbc0bc..0d7d4ca700e14cf3de70bac0d3336eeec3af08e7 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/hypervisor.h>
 #include <xen/evtchn.h>
 #include <xen/interface/io/fbif.h>
+#include <xen/interface/io/protocols.h>
 #include <xen/xenbus.h>
 #include <linux/kthread.h>
 
@@ -479,7 +480,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
                goto error_nomem;
 
        /* set up shared page */
-       info->page = (void *)__get_free_page(GFP_KERNEL);
+       info->page = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
        if (!info->page)
                goto error_nomem;
 
@@ -640,6 +641,10 @@ static int xenfb_connect_backend(struct xenbus_device *dev,
                            irq_to_evtchn_port(info->irq));
        if (ret)
                goto error_xenbus;
+       ret = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
+                           XEN_IO_PROTO_ABI_NATIVE);
+       if (ret)
+               goto error_xenbus;
        ret = xenbus_printf(xbt, dev->nodename, "feature-update", "1");
        if (ret)
                goto error_xenbus;